﻿
@using (Ajax.BeginForm("ListPartialView", "Contract",Html.ViewContext.RouteData.Values, new AjaxOptions
    {
        HttpMethod = "POST",
        UpdateTargetId = "list-car",
        InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace
    }))
    { 
        @UserQuery.CreateQuery(setting => {
       setting.QueryKey = QuerySettings.ContractList;
           setting.Columns.Add(new QueryColumn() { Field = "dept_name", Name = "单位" });
           setting.Columns.Add(new QueryColumn() { Field = "man_name", Name = "姓名" });
           setting.Columns.Add(new QueryColumn() { Field = "mobile", Name = "手机" });
           setting.Columns.Add(new QueryColumn() { Field = "office", Name = "办公室电话" });
           setting.Columns.Add(new QueryColumn() { Field = "email", Name = "电子邮箱" });
           setting.Columns.Add(new QueryColumn() { Field = "address", Name = "通信地址" });
       
        })
}

<div id="list-car">
    @Html.Action("ListPartialView")
</div>
<hr />
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "Button1";
    settings.Text = "增加通讯录";
    settings.Width = 120;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("Edit", "Contract") + "' }";
}).GetHtml()

